import {Authority, getBolb} from '../request'

const {post, get} = Authority

//获取虚拟设备
export const getVirtualDeviceList = params => get('/sys/import/v1/queryList', {params})
// 虚拟设备新增修改
export const virtualDeviceAddOrUpdate = params => post('/sys/import/v1/addOrUpdate', params)
// 虚拟设备温度补偿json获取
export const virtualDeviceTempJson = params => get('/sys/import/v1/queryTempJson', {params})

// 摄像机新增
export const cameraAdd = params => post('/equip/equip/v1/addCamera', params)

export const getEquipSelect = params => get('/erp/after-sale-order/v1/querySelectList', {params})

// 升级采集板配置文件版本
export const upgradeVersion = params => post('/equip/equip/v1/upVersionCode', params)

// 获取物联卡选择列表
export const iotCardSelectList = params => get('/equip/iot-card/v1/querySelectList', {params})

// 获取物联卡列表
export const queryIotCardList = params => get('/equip/iot-card/v1/queryList', {params})

// 物联卡新增
export const iotCardAdd = params => post('/equip/iot-card/v1/add', params)

// 物联卡更新
export const iotCardUpdate = params => post('/equip/iot-card/v1/update', params)

// 获取物联卡选择列表
export const caseSelectList = params => get('/equip/case/v1/querySelectList', {params})

// 获取外壳列表
export const queryCaseList = params => get('/equip/case/v1/queryList', {params})

// 外壳新增
export const caseAdd = params => post('/equip/case/v1/add', params)
// 外壳批量新增
export const caseAddList = params => post('/equip/case/v1/addList', params)

// 外壳更新
export const caseUpdate = params => post('/equip/case/v1/update', params)

// 获取传感器列表
export const sensorQuery = params => get('/equip/sensor/v1/queryList', {params})

// 传感器删除
export const sensorDelete = params => post('/equip/sensor/v1/delete', params)

// 传感器新增
export const sensorAdd = params => post('/equip/sensor/v1/add', params)

// 传感器修改
export const sensorUpdate = params => post('/equip/sensor/v1/update', params)

// 传感器参数下载
export const sensorParamDownload = params => get('/equip/sensorSettings/v1/ExportTxt', {params})

// 获取传感器参数列表
export const sensorParamQuery = params => get('/equip/sensorSettings/v1/queryList', {params})

// 传感器参数删除
export const sensorParamDelete = params => post('/equip/sensorSettings/v1/delete', params)

// 传感器参数新增
export const sensorParamAdd = params => post('/equip/sensorSettings/v1/add', params)

// 传感器参数批量新增
export const sensorParamAddMore = params => post('/equip/sensorSettings/v1/import', params)


export const sensorParamAddMat = params => post('/equip/sensorSettings/v1/importMat', params)

// 获取设备列表
// export const deviceQuery = params => get('/equip/equip/v1/queryList', {params})

// 获取可授权设备列表
export const deviceAuthList = params => get('/equip/equip/v1/queryAuthList', {params})

// 设备取消授权
export const deviceCancel = params => post('/equip/equip/v1/authCancel', params)

// 设备授权
export const deviceAuth = params => post('/equip/equip/v1/auth', params)

// 设备查询传感器
export const relateSensor = params => get('/equip/equip/v1/queryEquipSensor', {params})

// 监测单位查询
export const monitorQuery = params => get('/user/userPlatform/v1/querySelectList', {params})

// 上位机列表
export const swjQueryList = params => get('/equip/equip/v1/queryList', {params})

// 传感器在线记录
export const queryStatus = params => get('/equip/equip/v1/queryStatusListBySn', {params})

// 上位机更新
export const swjUpdate = params => post('/equip/equip/v1/update', params)

// 上位机更新型号
export const swjUpdateModel = params => post('/equip/equip/v1/updateModel', params)

// 上位机新增
export const swjAdd = params => post('/equip/equip/v1/add', params)


export const equipInfoQuery = params => get('/equip/model/v1/getInfo', {params})

// 上位机删除
export const swjDelete = params => post('/equip/equip/v1/delete', params)

export const updateConfigVersion = params => post('/equip/equip/v1/updateConfigVersion', params)

// 上位机查询传感器
export const cgqQueryEquipSensor = params => get('/equip/equip/v1/queryEquipSensor', {params})

// 设备信息可关联传感器
export const queryCanUseSensor = params => get('/equip/equip/v1/queryCanUseSensor', {params})

// 监测预警规则列表
export const warningRuleList = params => get('/monitor/warningRule/v1/queryList', {params})

// 开关工点预警
export const warningRuleFlag = params => post('/monitor/warningRule/v1/flag', params)

// 监测预警规则列表修改
export const warningRuleUpdate = params => post('/monitor/warningRule/v1/update', params)

export const queryUserList = params => get('/monitor/warningRule/v1/queryUserList', {params})

export const queryUserByProject = params => get('/monitor/warningRule/v1/queryUserByProject', {params})

// 预警短信通知号码修改
export const warningUserUpdate = params => post('/monitor/warningRule/v1/updateProjectUser', params)

export const warningWorkPointUserUpdate = params => post('/monitor/warningRule/v1/updateWorkPointUser', params)

export const sensorParamExport = params => getBolb('/equip/sensorSettings/v1/Export', {params})

// 地质灾害监测云平台>设备管理查询
export const pointDeviceQuery = params => get('/equip/equip/v1/deviceList', {params})

// 获取所有设备型号
export const getEquipType = params => get('/equip/model/v1/querySelectList', {params})

// 型号通信模式关联列表
export const equipNettyQuery = params => get('/equip/model/v1/queryList', {params})

// 型号通信模式关联列表
export const equipNettyAdd = params => post('/equip/model/v1/add', params)

export const equipNettyUpdate = params => post('/equip/model/v1/update', params)

export const equipNettyDelete = params => post('/equip/model/v1/delete', params)

export const companyAddOrUpdate= params => post('/erp/company-info/v1/addOrUpdate', params)

export const companyUpdate = params => post('/erp/company-info/v1/update', params)

export const companyQuery = params => get('/erp/company-info/v1/queryList', {params})

export const companySelectQuery = params => get('/erp/company-info/v1/querySelectList', {params})

export const afterSaleAdd = params => post('/erp/after-sale-order/v1/add', params)

export const afterSaleUpdate = params => post('/erp/after-sale-order/v1/update', params)

export const afterSaleQuery = params => get('/erp/after-sale-order/v1/queryList', {params})


// 固件版本修改
export const versionUpdate = params => post('/equip/version-control/v1/update', params)
// 固件版本新增
export const versionAdd = params => post('/equip/version-control/v1/add', params)
// 固件版本列表
export const versionQueryList = params => get('/equip/version-control/v1/queryList', {params})

// 配置版本修改
export const configUpdate = params => post('/equip/config-version/v1/update', params)
// 配置版本删除
export const configDelete = params => post('/equip/config-version/v1/delete', params)
// 配置版本新增
export const configAdd = params => post('/equip/config-version/v1/add', params)
// 配置版本列表
export const configQueryList = params => get('/equip/config-version/v1/queryList', {params})
// 配置版本选择列表
export const configQuerySelectList = params => get('/equip/config-version/v1/querySelectList', {params})
//获取设备的时间轴
export const equipStatusList = params => get('/equip/equip/v1/statusList', {params})


//获取设备各项统计
export const equipEchart = params => get('/statistics/equip/v1/chart', {params})

//获取电路表各项统计
export const equipQueryVoltageList = params => post('/equip/equip/v1/queryVoltageList', params)

// GNSS新增
export const addGNSS = params => post('/equip/sensor/v1/addGNSS', params)
//获取设备列表
export const getEquipDataList = params => get('/miniapp/equip/v1/queryList', {params})
